Skip to content

test(server-nestjs): cas limites des utilitaires partagés (edges, BigInt, cron) - #2588

Draft
shikanime wants to merge 3 commits into
mainfrom
test/adv-utils
Draft

test(server-nestjs): cas limites des utilitaires partagés (edges, BigInt, cron)#2588
shikanime wants to merge 3 commits into
mainfrom
test/adv-utils

Conversation

@shikanime

Copy link
Copy Markdown
Member

Issues liées

#2574


Quel est le comportement actuel ?

Les utilitaires partagés avaient des angles morts mesurés : utils/http.utils.ts 46%, config/config.utils.ts 59%, project-members.utils 0%, vault.utils 40%.

Quel est le nouveau comportement ?

+495 lignes / ~60 tests sur 5 fichiers :

  • http.utils : mapping statut/description, masquage d'identifiants, écrasement cause-sur-direct verrouillé avec commentaire explicite ;
  • config.utils : csv (null→[], scalaire rejeté), flag/truthy, bornes du schéma cron 6 champs — le ? Quartz en day-of-month est accepté et documenté comme divergence assumée (Harbor l'utilise) ;
  • project-members.utils, vault.utils, project-queries.utils : entrées vides/malformées, BigInt aux frontières de permissions.

138/138 tests verts sur Node 24. Deux comportements surprenants sont scellés par des tests avec commentaires ponytail-bug: pointant les lignes concernées.

Cette PR introduit-elle un breaking change ?

Non.

@github-actions github-actions Bot added the built label Aug 25, 2026
@shikanime shikanime changed the title test(server-nestjs): couverture adversariale des utilitaires partagés (edges, BigInt, cron) test(server-nestjs): cas limites des utilitaires partagés (edges, BigInt, cron) Aug 26, 2026
Comment thread apps/server-nestjs/src/modules/project-members/project-members.utils.spec.ts Outdated
Comment thread apps/server-nestjs/src/config/config.utils.spec.ts Outdated
Comment thread apps/server-nestjs/src/config/config.utils.spec.ts Outdated
Comment thread apps/server-nestjs/src/modules/project/project-queries.utils.spec.ts Outdated
Comment thread apps/server-nestjs/src/modules/project-members/project-members.utils.spec.ts Outdated
Comment thread apps/server-nestjs/src/utils/http.utils.spec.ts Outdated
@shikanime
shikanime force-pushed the test/adv-utils branch 3 times, most recently from e3e662c to eb97e9a Compare August 31, 2026 11:05
…ls specs

Drop as never casts in config.utils flag-strictness tests (parse accepts
unknown) and in project-queries specs by using generateProjectCreateInput
with faker data and the Prisma payload type for findFirst, per server-nestjs
vitest convention.

Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>
Change-Id: Id26640977d08fdc24155d60cbde460a06a6a6964
@shikanime
shikanime force-pushed the test/adv-utils branch 2 times, most recently from 684920d to c007915 Compare August 31, 2026 12:51
@cloud-pi-native-sonarqube

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant